import request from '/@/utils/request';

// 查询订单列表
export function listOrder(query?: Object) {
  return request({
    url: '/module/charger/order/list',
    method: 'get',
    params: query
  })
}


// 查询订单列表
export function listRecordData(query?: Object) {
  return request({
    url: '/module/charger/order/record/data/list',
    method: 'get',
    params: query
  })
}

// 查询订单列表
export function listOrderTongji(query?: Object) {
  return request({
    url: '/module/charger/order/tongjiList',
    method: 'get',
    params: query
  })
}


// 查询订单详细
export function getOrder(id?: number) {
  return request({
    url: '/module/charger/order/' + id,
    method: 'get'
  })
}

// 查询退款信息
export function queryRefundOrder(id?: number) {
  return request({
    url: '/module/charger/order/queryRefund/' + id,
    method: 'get'
  })
}


// 新增订单
export function addOrder(data?: Object) {
  return request({
    url: '/module/charger/order',
    method: 'post',
    data
  })
}

// 修改订单
export function updateOrder(data?: Object) {
  return request({
    url: '/module/charger/order',
    method: 'put',
    data
  })
}

// 删除订单
export function delOrder(id?: number) {
  return request({
    url: '/module/charger/order/' + id,
    method: 'delete'
  })
}

// 订单退款
export function refundOrder(data?: Object) {
  return request({
    url: '/module/charger/order/refundOrder',
    method: 'post',
    data
  })
}


// 导出订单
export function exportOrder(query?: Object) {
  return request({
    url: '/module/charger/order/export',
    method: 'get',
    params: query
  })
}


// 导出充电设备
export function exportTongjiCharger(query?: Object) {
  return request({
    url: '/module/charger/order/exportTongji',
    method: 'get',
    params: query
  })
}

// 查询用电量
export function dianliangList(query?: Object) {
  return request({
    url: '/module/charger/order/dianliangList',
    method: 'get',
    params: query
  })
}


export function getPoint(query?: Object) {
  return request({
    url: '/module/charger/order/jiekouList',
    method: 'get',
    params: query
  })
}

export function estateChargerList(query?: Object) {
  return request({
    url: '/module/charger/order/estateChargerList',
    method: 'get',
    params: query
  })
}

export function shebeiChargerList(query?: Object) {
  return request({
    url: '/module/charger/order/shebeiChargerList',
    method: 'get',
    params: query
  })
}
